
#include "String.h"

namespace ouden {

class CBaseEntity
{
	
public:
	
	void update()
	{
		
		onFrame();
		
		//TODO: Work out where curtime is stored
		//if (CurTime >= m_fNextThinkTime) {
		//	onThink(m_iThinkState);
		//}
		
	}
	
	void setThinkState(int newThinkState) 		{ m_iThinkState = newThinkState; }
	void setNextThink(float nextThinkTime) 		{ m_fNextThinkTime = nextThinkTime; }
	
	void addToCategory(String categoryName);
	
protected:
	
	virtual void onFrame() 		{} 		//Called every frame
	virtual void onTick()		{}		//Called at constant frame rate
	virtual void onThink(int thinkState) 		{}
	
	String m_sName; 		//Name identifier of the entity
	
private:
	
	int m_iThinkState;
	float m_fNextThinkTime;
	
};

} //namespace ouden
